Function.prototype.myApply = function (context) {
  if (typeof this !== 'function') {
    return new Error('error')
  }
  context.fn = this;
  const args =  arguments[1] || [];

  const res = context.fn(...args);

  delete context.fn;

  return res;
}
